package com.cap.bts.crmdp.mars.util;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

import org.apache.commons.lang3.StringUtils;

public class URLEncoderUtil {
	
	/**
	 * 
	 * @param parame
	 * @return
	 * @throws UnsupportedEncodingException 
	 */
	public static String encode(String parame) throws UnsupportedEncodingException{
		
		if(StringUtils.isBlank(parame)){
			return "";
		}
		
		String tmp = URLEncoder.encode(parame, "UTF-8");
		
		return 	tmp.replaceAll("\\+", "%20");	
	}

}
